<?php include_once( dirname(__FILE__) . '/functions.php');
    if ($_GET['page']=="processqueue-auto") {
       // 判断当前时间是否在周一至周五的12:00到18:30之间
        // 获取当前时间的小时和分钟
        $currentHour = date('H');
        $currentMinute = date('i');

        // 获取当前时间是星期几（0 代表周日，1 代表周一，以此类推）
        $currentDayOfWeek = date('w');

        // 判断当前时间是否在周一至周五的12:00到18:30之间
        // if ($currentDayOfWeek >= 1 && $currentDayOfWeek <= 5) {
            
        // } else {
        //     // 获取当前页面的协议
        //     $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";

        //     // 获取当前页面的主机名
        //     $host = $_SERVER['HTTP_HOST'];

        //     // 获取当前页面的路径和查询字符串
        //     $uri = $_SERVER['REQUEST_URI'];

        //     // 构建完整的 URL 地址
        //     $currentURL = $protocol . "://" . $host . $uri;

        //     $jump_url = $protocol . "://" . $host . "/processqueue_jump.php?page=".$_GET['page']."&tk=".$_GET['tk'];
        //     // echo "666";
        //     // 重定向到指定的 URL
        //     header('Location: '.$jump_url);
        //     exit; // 确保在执行跳转后立即退出脚本，以避免后续代码执行
        // } 
    }
/*
  We request you retain the full headers below including the links.
  This not only gives respect to the large amount of time given freely
  by the developers, but also helps build interest, traffic and use of
  , which is beneficial to it's future development.

  Michiel Dethmers,  Ltd 2003 - 2018
*/
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['adminlanguage']['iso']?>" dir="<?php echo $_SESSION['adminlanguage']['dir']?>" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8" />
<?php if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) header('X-UA-Compatible: IE=edge'); ?>
<meta name="theme-color" content="#2C2C2C"/>
<meta name="robots" content="noindex, nofollow" />
<?php if ($_GET['page']=="processqueue-auto") { ?>
    <?php if ($currentDayOfWeek >= 1 && $currentDayOfWeek <= 5) { ?>
        <meta http-equiv="refresh" content="40">
    <?php }else{?>
        <meta http-equiv="refresh" content="36000">
    <?php } ?>
<?php } ?>
<?php if ($_GET['page']=="processqueue") { ?>
    <meta http-equiv="refresh" content="600">
<?php } ?>
<link rel="shortcut icon" href="/admin/images/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon-precomposed" href="/edm/admin/ui/phplist-ui-bootlist/logo.png" />
<!-- initial styles and JS from basic application -->
<!-- the CSS is already mostly minified -->
<link rel="stylesheet" href="/admin/ui/phplist-ui-bootlist/css/bootstrap-toggle.min.css?v=2" />
<link rel="stylesheet" href="/admin/ui/phplist-ui-bootlist/css/bootstrap-select.min.css?v=2" />
<link rel="stylesheet" href="/admin/ui/phplist-ui-bootlist/css/style.css?v=2" />
<link rel="stylesheet" href="/admin/css/app.css" />
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style type="text/css">#cke_notifications_area_message{display: none;}</style>
<?php
if (isset($GLOBALS['config']['head'])) {
    foreach ($GLOBALS['config']['head'] as $sHtml) {
        print $sHtml;
        print "\n";
        print "\n";
    }
}
